﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using ZhangBY.Entity;
using ZhangBY.Data.IDbSupplier;

namespace ZhangBY.Data.DataProvider
{
    public class User
    {
        /// <summary>
        /// 根据用户名查找用户信息并用户返回ID
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static object GetUserIdByUserName(ShortUserInfo user)
        {
           return DbSupplier.GetInstance.GetUserIdByUserName(user);
        }
        /// <summary>
        /// 根据用户名查找用户信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static DataTable GetUserByUserName(ShortUserInfo user)
        {
            return DbSupplier.GetInstance.GetUserByUserName(user);                                 
        }
        /// <summary>
        /// 根据用户名和密码查找用户信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static DataTable GetUserByUserNameAndUserPass(ShortUserInfo user)
        {
            return DbSupplier.GetInstance.GetUserByUserNameAndUserPass(user);
        }
    }
}
